package Supplier;

import java.util.function.Supplier;

/***
 * Supplier 与 Function 不同，它不接受入参，直接为我们生产一个指定的结果，有点像生产者模式：
 */
public class Person {

    public String firstName;

    public String lastName;

    Person(){

    }


    Person(String firstName,String lastName){
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public static void main(String[] args){
        Supplier<Person> personSupplier = Person::new;
        personSupplier.get();  //new person
    }
}
